package org.jetnuke.dao.sqlserver;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;

import net.jforum.JForumExecutionContext;
import net.jforum.util.preferences.SystemGlobals;

import org.jetnuke.dao.PictureUserSettingsDAO;
import org.jetnuke.dao.generic.GenericPictureUserSettingsDAO;

public class SqlServerPictureUserSettingsDAO extends
		GenericPictureUserSettingsDAO implements PictureUserSettingsDAO {

	public List get(int offset, int rowcount) throws Exception {
		PreparedStatement p;
		String q = SystemGlobals.getSql("PictureUserSettingsModel.get");
		q=q.replaceAll("#start",String.valueOf(offset));
		q=q.replaceAll("#limit",String.valueOf(rowcount));
		p = JForumExecutionContext.getConnection().prepareStatement(q);
		ResultSet rs = p.executeQuery();
		List list = this.processSelectAll(rs);
		rs.close();
		p.close();
		
		return list;
	}

}
